<%@page import="com.exam.role.model.Module"%>
<%@page import="com.exam.role.model.RoleModule"%>
<%@page import="java.util.List"%>
<%@page import="com.exam.role.model.User"%>
<%@page import="com.exam.util.Constants"%>
<%@ page language="java" contentType="text/html; charset=GBK"
	pageEncoding="GBK"%>
<%@page import="java.util.Date"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<script src="resources/js/tree.js" type="text/javascript"></script>
		<link href="resources/css/tree.css" rel="stylesheet" type="text/css" />
		<meta http-equiv="Content-Type" content="text/html; charset=GBK">

	</head>
	<%
		User user = Constants.loginUser(session);
	%>
	<body>
		<div id="my_menu" class="sdmenu">
			<%
				List<Module> menus = user.getMenus();
				if (null != menus) {
					for (int i = 0; i < menus.size(); i++) {
						Module menu = menus.get(i);
						if (null != menu && menu.getLevel().equals("1")
								&& null != menu.getHaveRole()) {
			%>
			<div>
				<span><%=menu.getTitle()%></span>
				<%
					List<Module> sonMenus = menu.getModules();
								for (int j = 0; j < sonMenus.size(); j++) {
									Module sonMenu = sonMenus.get(j);
									if (sonMenu != null
											&& null != sonMenu.getHaveRole()) {
				%>
				<a href="<%=sonMenu.getMurl()%>" target="frame3"><%=sonMenu.getTitle()%></a>

				<%
					}
								}
				%>
			</div>
			<%
				}
					}
				}
			%>
			<div>
	</body>
</html>
<script type="text/javascript">
	// <![CDATA[
	var myMenu;
	window.onload = function() {
		myMenu = new SDMenu("my_menu");
		myMenu.init();
		var firstSubmenu = myMenu.submenus[0];
		myMenu.expandMenu(firstSubmenu);
	};
	// ]]>
</script>